This invention relates to communications systems, methods and computer program products, and more particularly to systems, methods and computer program products for communicating between two devices that are connected by a communications network.
Communications networks are widely used to communicate among devices that are attached thereto. As is well known to those having skill in the art, the devices may include mainframe computers, midrange computers, personal computers, workstations, terminals and/or telecommunications devices, such as cellular radiotelephones, satellite radiotelephones, personal digital assistants and/or other wireless communications devices. The network may include a Local Area Network, a Wide Area Network, the Internet, an intranet, a cellular/satellite radiotelephone communications network and/or other wired or wireless communications networks. Communications may take place in a peer-to-peer, client-server or other environments. FIG. 1 is a simplified block diagram of conventional network communications between Device 1100 and Device 2120 over a communications network 110.
When two devices 100 and 120 communicate between one another over a communications network 110, the messages between the devices may be lost due to errors in the network and/or other reasons. When messages are lost, they generally are retransmitted. In order to determine whether a message has been lost, a receiving device generally transmits an acknowledgement message to a transmitting device for each received message. If the transmitting device does not receive the acknowledgement message after a fixed time elapses, it can retransmit the original message.
The fixed time, also referred to as a retransmission timeout, generally is set to be long enough to account for all possible delays that may be present in the network. By accounting for all possible delays, the number of messages that are needlessly retransmitted can be reduced and preferably can be eliminated. Unfortunately, when an error occurs in the network and a message sent by a first device is not received by a second device, the long retransmission timeout may produce long communications delays between the two devices. These delays can degrade communications between the devices.
It is therefore an object of the present invention to provide improved systems, methods and computer program products for communicating between two devices that are connected by a communications network.
It is another object of the present invention to provide systems, methods and computer program products for communicating between two devices that are connected by a communications network, which can reduce the retransmission timeout that controls retransmission of a message that is not received.
These and other objects are provided according to the present invention by systems, methods and computer program products for communicating between two devices that are connected by a communications network, by repeatedly measuring a round-trip communications delay between the two devices over the communications network, and adjusting an adjustable retransmission timeout based upon at least one of the round-trip communications delays that are repeatedly measured. A message that is not acknowledged during the adjustable retransmission timeout is retransmitted. The adjustable retransmission timeout preferably is based upon the last measured round-trip communications delay. Accordingly, the overall communications speed between the two devices may be increased by accounting for the actual delay that is present in the network at a given time, and basing an adjustable retransmission timeout on this actual delay. Improved systems, methods and computer program products for communicating between two devices that are connected by a communications network thereby can be provided.
In particular, according to the present invention, a first message is transmitted (sent) at a first (transmit) time and an acknowledgement of the first message is received at a second (receive) time. A time difference between the second time and the first time is then determined, to thereby obtain the adjustable retransmission timeout. Transmission, reception and determination of a time difference are repeatedly performed, preferably on a periodic basis, to thereby measure the actual round-trip delay in the network, and thereby obtain a suitable value for the timeout.
The first message may be a unique delay measurement message that is used to measure delay and that does not contain communications data. The delay measurement message may contain a timestamp therein that indicates the first time. Alternatively, the transmitting device may maintain a record of the time that the first message was transmitted. The delay measurement message also preferably contains padding therein, so that the delay measurement is at least as long as a longest communication message between the two devices. Thus, although the round-trip communications delay is adjusted based on the actual performance of the network, the performance can represent the actual worst case performance for a longest message.
The acknowledgement message may be an echo back of the first message. Alternatively, the acknowledgement message may be a unique acknowledgement message.
In yet another alternative, the first message is not a unique delay measurement message. Rather, the first message may be a preexisting communications message that is sent from the first device to the second device. The communications message may include a timestamp, or the time that the first message was sent may be recorded in the first device.
The adjustable time may correspond identically to the last measured round-trip delay. Alternatively, the adjustable time may be based on an average of a predetermined number of last round-trip delay measurements. In yet another alternative, a guard band may be added to the last measured round-trip delay to account for potential changes since the last measured delay time. Other techniques for determining the adjustable time may be provided.
Accordingly, the overall communications speed between the devices may be increased sincc the retransmission may be performed as soon as possible. A higher number of errors also may be able to be tolerated by the communications network, since the number of retransmissions during a given period of time may be increased. By automatically adapting to changed communication network delays, improved systems, methods and computer program products for communicating between two devices that are connected by a communications network may be provided.